import React from 'react';
import ReactDOM from 'react-dom/client';
import { Provider } from 'react-redux';
import store from './store';
import "lib-flexible"
import { ConfigProvider } from 'antd-mobile'
import zhCN from 'antd-mobile/es/locales/zh-CN'


import './index.less';
import App from '@/App';

// 处理rem最大宽度
(function () {
  const handleMax = function () {
    let deviceW = document.documentElement.clientWidth,
      root = document.getElementById("root");
    root.style.maxWidth = "750px";
    if (deviceW >= 750) {
      document.documentElement.style.fontSize = "75px"
    }
  };
  handleMax();
  window.addEventListener("resize", handleMax)
})();

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <ConfigProvider locale={zhCN}>
      <Provider store={store}>
        <App />
      </Provider>
    </ConfigProvider>
  </React.StrictMode>
);

